﻿<phone:PhoneApplicationPage 
	x:Class="Coding4Fun.WheresMyCar.MapPage"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:my="clr-namespace:Coding4Fun.WheresMyCar"
	
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" d:DesignHeight="728" d:DesignWidth="480">

	<phone:PhoneApplicationPage.Resources>
		<my:DistanceConverter x:Key="DistanceConverter"/>
    </phone:PhoneApplicationPage.Resources>

	<!--LayoutRoot contains the root grid where all other page content is placed-->
	<Grid x:Name="LayoutRoot">
		<Grid x:Name="MapGrid" />

		<Grid VerticalAlignment="Top" HorizontalAlignment="Right">
			<Rectangle Fill="{StaticResource PhoneAccentBrush}" Opacity=".8" />
            <StackPanel>
                <StackPanel Orientation="Horizontal" Margin="10,3">
                    <TextBlock Text="{Binding Settings.DistanceToCar, Converter={StaticResource DistanceConverter}}" />
                    <TextBlock Text=" from car" />
                </StackPanel>
                <!-- StackPanel Orientation="Horizontal" Margin="10,3">
                    <TextBlock Text="Heading: " />
                    <TextBlock Text="{Binding Settings.HeadingToCar}" />
                </StackPanel -->
            </StackPanel>
        </Grid>

		<Grid VerticalAlignment="Bottom" HorizontalAlignment="Right">
			<Rectangle Fill="{StaticResource PhoneAccentBrush}" Opacity=".8" />
			<StackPanel>
				<StackPanel Orientation="Horizontal" Margin="10,3">
					<TextBlock Text="Accuracy: " />
					<TextBlock Text="{Binding Accuracy}" />
					<TextBlock Text="m" />
				</StackPanel>
				<!-- StackPanel Orientation="Horizontal" Margin="10,3">
                    <TextBlock Text="Heading: " />
                    <TextBlock Text="{Binding Settings.HeadingToCar}" />
                </StackPanel -->
			</StackPanel>
		</Grid>
	</Grid>

	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar>
            <shell:ApplicationBarIconButton Text="Zoom to Car" x:Name="BtnCar" Click="appbar_ShowCar_Click" IconUri="/Images/dark/car2.png" />
            <shell:ApplicationBarIconButton Text="Zoom to Me" x:Name="BtnMe" Click="appbar_ShowMe_Click" IconUri="/Images/dark/me.png" />
			<shell:ApplicationBarIconButton Text="Route" x:Name="BtnRoute" Click="appbar_Route_Click" IconUri="/Images/dark/arrow.png" />
        </shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
